
/*****************************************************************************
 *
 * 作   者: 伍建平 * 创建时间: 2022/12/1 11:39:40 *
 * Copyright (C) 2008 - 鹏业软件公司
 *
 *****************************************************************************/

import {DataPacket, NorDataList} from 'pengesoft-ng-lib';

/**
 * 看房申请表
 */
export class HouseViewingApply extends DataPacket {
  Id: string; // id
  CustomerId: string; // 申请人
  CustomerName: string; // 客户姓名
  HouseId: string; // 目标房屋
  Status: number; // 看房状态
  ApplyTime: Date; // 申请时间
  UpdateTime: Date; // 修改时间
  IsDelete: number; // 是否撤销
  Date: string; // 预约日期
  Time: string; // 预约时间段
  Province: string; // 房屋信息-省
  City: string; // 房屋信息-市
  Region: string; // 房屋信息-区
  DetailAddress: string; // 房屋信息-详细地址
  Community: string; // 房屋信息-社区

  constructor(options: Partial<HouseViewingApply> = {}) {
    super();
    this.Id = options.Id || '';
    this.CustomerId = options.CustomerId || '';
    this.CustomerName = options.CustomerName || '';
    this.HouseId = options.HouseId || '';
    this.Status = !options.Status ? 0 : Number.parseFloat(options.Status.toString());
    this.ApplyTime = this.newDate(options.ApplyTime)!;
    this.UpdateTime = this.newDate(options.UpdateTime)!;
    this.IsDelete = !options.IsDelete ? 0 : Number.parseFloat(options.IsDelete.toString());
    this.Date = options.Date || '';
    this.Time = options.Time || '';
    this.Province = options.Province || '';
    this.City = options.City || '';
    this.Region = options.Region || '';
    this.DetailAddress = options.DetailAddress || '';
    this.Community = options.Community || '';
  }
}

/**
 * 看房申请表列表
 */
export class HouseViewingApplyList extends NorDataList<HouseViewingApply> {

  constructor(options: Partial<HouseViewingApplyList> | Array<HouseViewingApply> = {}) {
    super(options, HouseViewingApply);
  }
}

